package org.anyline.simiple;


import org.anyline.pdf.util.PDFUtil;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.File;
import java.io.InputStream;
import java.nio.file.Files;
import java.util.List;


@SpringBootApplication

public class PdfApplication  {

	public static void main(String[] args) throws Exception {
		File file = new File("D:\\order.pdf");
		File copy = new File("D:\\order_copy.pdf");
 		String text = PDFUtil.read(file);
		System.out.println(text);

		List<String> list = PDFUtil.reads(file, true);
		int page = 0;
		for(String str : list){
			System.out.println("-----------" + page++ + "------------");
			System.out.println(str);
			System.out.println("===============" + page + "====================");
		}

	}

}
